<?php
    apf_require_class("PageHelper");
    $img_path = '/img/home/';
    ?>

<div class="header">
    <div class="bg_top"></div>
    <div class="logo"></div>
</div>
<div class="container">
<h3>员工入职办理</h3>
<form action="#" id="form1" method="post">
  <?php foreach($users as $user){?>
    <table>
        <tr>
            <td><label>姓名:</label><?php echo $user['real_name'],'-',$user['user_code'];?><input type="hidden" name="entry_id[]" value="<?=$user['entry_id']?>"></td>
            <td><label>英文名:</label><?php echo $user['english_name'];?></td>
            <td><label>城市:</label><?php echo $user['city_name'];?></td>
            <td><label>部门:</label><?php echo $user['department_name'];?></td>
            <td style="width: 130px;white-space: nowrap;" title="<?php echo $user['job_name'];?>"><label>职位:</label><?php echo $user['job_name'];?></td>
            <td><label>直属主管:</label><?php echo $user['parent_name'];?>(电话:<?php echo $user['parent_phone'];?>)</td>
        </tr>
    </table>
    <div class="p0">
        <span>行政</span>
        <ul>
            <li style="width: 210px">
                <label>电脑：</label>
                <select style="width: 104px;<?php if(isset($error[$user['entry_id']]['computer'])){echo 'border-color: red;';}?>" name="computer[]" class="{required:true,messages:{required:'请选择电脑信息'}}">
                <option value="">请选择</option>
                <?php foreach($computer as $in=>$co){?>
                        <option value="<?php echo $in;?>" <?php if($in == $user['computer']){?>selected="selected"<?php }?>><?php echo $co;?></option>
                <?php }?>
                </select>
            </li>
            <li style="width: 244px;">
                <label>办公地点：</label>
                <select class="{required:true,messages:{required:'请选择办公地点'}}" style="width: 160px;padding-right: 0;<?php if(isset($error[$user['entry_id']]['work_space'])){echo 'border-color: red;';}?>" name="work_space[]">
                <option value="">请选择</option>
                <?php foreach($work_space[$user['work_city_id']] as $in=>$co){?>
                        <option value="<?php echo $in;?>" <?php if($in == $user['work_space']){?>selected="selected"<?php }?>><?php echo $co;?></option>
                <?php }?>
                </select>
            </li>
            <li>
                <label>座位：</label>
                <input style="width: 100px;<?php if(isset($error[$user['entry_id']]['seat'])){echo 'border-color: red;';}?>" class="{required:true,messages:{required:'请填写员工座位信息'}}" type="text" name="seat[]" value="<?php echo $user['seat'];?>" />
            </li>
            <li style="width: 210px;margin-top: 8px;">
                <label>电脑编号：</label>
                <input style="width: 96px;<?php if(isset($error[$user['entry_id']]['computer_code'])){echo 'border-color: red;';}?>" type="text" name="computer_code[]" class="{required:true,messages:{required:'请填写电脑编号'}}" value="<?php echo $user['computer_code'];?>" />
            </li>
            <li style="width: 307px;margin-top: 8px;">
                <label style="">分机号：</label>
                <input style="width: 84px" type="text" name="office_phone[]" value="<?php echo $user['office_phone'];?>" /> - <input style="width: 50px" type="text" name="office_phone_ex[]" value="<?php echo $user['office_phone_ex']?$user['office_phone_ex']:'';?>" />
            </li>
            <li style="padding-top: 12px;line-height: 15px;;">
                <input type="checkbox" name="is_instal[]" style="vertical-align: middle;" <?php if($user['is_instal']) {?>checked<?php }?> />
                <label>新增电话</label>
            </li>
        </ul>
    </div>
  <?php }?>
    <div class="p0 p3">
        <input type="hidden" name="type" value="3"/>
        <input type="hidden" name="flow_type" value="1"/>
        <input type="hidden" name="role" value="xz"/>
        <input type="submit" class="button" id="btnSubmit" value="提    交"/>
        <a href="<?=Flow_Urls::flow_list()?>">取消</a>
    </div>
    </form>
</div>
<div class="footer"></div>
<?php $this->script_block_begin(); ?>
<script type="text/javascript">
</script>
<?php $this->script_block_end(); ?>